import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:lepig/model/SearchModel.dart';

/**
 * 首页搜索区域
 */
class SearchView extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Container(
      padding: EdgeInsets.fromLTRB(5.0, 6.0, 5.0, 6.0),
      child: InkWell(
        child: Row(
          mainAxisAlignment: MainAxisAlignment.start,
          children: <Widget>[
            new Icon(Icons.search, color: Colors.black38,),
            new Text("复制商品标题, 立享受优惠", style: TextStyle(
              color: Colors.black38,
              fontSize: 15.0,
            ),),
          ],
        ),
        onTap: (){
          Navigator.of(context).pushNamed("/search",arguments: new SearchModel());
        },
      ),
      decoration: new BoxDecoration(
        color: Colors.white,
        borderRadius: BorderRadius.all(Radius.circular(40.0)),
      ),
    );
  }
}
